import { createStore } from 'redux'

// 定义 state 初始化和修改规则
function counterReducer(state = 0, action){
    switch (action.type){
        case 'ADD':
            return state + 1
        case 'MINUS':
            return state - 1
        default:
            return state
    }
}

let store = createStore(counterReducer)

export default store;